|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectraar.agent.process.RAProcess
raar.agent.process.actor.RAActor
public abstract class RAActor
RAActor is a process with only one RAReal input. Mind the fact that an RAActor does not have any registers! Most methods are therefore emulated and will work as expected. Class is abstract because implemented actors must take care that only valid values are set. Do this by implementing the isInputValid method.
In this version, the Java null is supported as input. It will result in a zero value (since zero means no action).
| Field Summary |
|---|
| Fields inherited from class raar.agent.process.RAProcess |
|---|
hasRun, inregister, outregister, register, sourceCode, statement |
| Constructor Summary | |
|---|---|
RAActor(java.lang.String inputName)
Construct an RAActor with given input name. |
|
| Method Summary | |
|---|---|
boolean |
acceptsInput(RADataType obj,
java.lang.String name)
Returns true if the process would accept the specified input object and name. |
void |
dumpRegisters()
Give a System.out dump of the current content. |
void |
execute()
Executing an actor is not allowed and will throw an exception. |
RADataType |
get(java.lang.String key)
Get a specific key's value from the output register. |
RAReal |
getActorValue()
Returns the RAReal currently stored in the actor (the actor value). |
RADataType |
getDataType(java.lang.String name)
Returns the datatype for a given name. |
abstract java.lang.String |
getDescription()
Describe the actor. |
java.util.Vector |
getInputNames()
Get a String vector containing the names of the keys the input register stores (in order). |
java.util.Vector |
getInputObjects()
Get an RADataType vector containing the current content of the input register. |
java.util.Vector |
getOutputNames()
Get a String vector containing the names of the keys the output register stores (in order). |
java.util.Vector |
getOutputObjects()
Get an RADataType vector containing the current content of the output register. |
abstract boolean |
isInputValid(RADataType value)
Implement this method to make the actor only respond to valid values. |
void |
run()
Run the actor; for compatibility with other processes you can use this method, however it does not actually do anything. |
void |
set(java.lang.String key,
RADataType value)
Set a specific key in the input register to a specific value. |
void |
setSourceCode(java.lang.String code)
Setting the process source code is illegal and will do nothing. |
| Methods inherited from class raar.agent.process.RAProcess |
|---|
clone, getProcessName, getSourceCode, isSpecial, reset, setProcessName, suppliesOutput |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RAActor(java.lang.String inputName)
| Method Detail |
|---|
public void setSourceCode(java.lang.String code)
setSourceCode in class RAProcess
public void execute()
throws RAException
execute in class RAProcessRAException
public void run()
throws RAException
run in class RAProcessRAExceptionpublic void dumpRegisters()
dumpRegisters in class RAProcesspublic abstract java.lang.String getDescription()
public void set(java.lang.String key,
RADataType value)
throws RAException
set in class RAProcessRAExceptionpublic abstract boolean isInputValid(RADataType value)
public boolean acceptsInput(RADataType obj,
java.lang.String name)
acceptsInput in class RAProcess
public RADataType get(java.lang.String key)
throws RAException
get in class RAProcessRAException
public RADataType getDataType(java.lang.String name)
throws RAException
getDataType in class RAProcessRAExceptionpublic java.util.Vector getInputNames()
getInputNames in class RAProcesspublic java.util.Vector getInputObjects()
getInputObjects in class RAProcesspublic java.util.Vector getOutputNames()
An Actor does not have any outputs and will return null.
getOutputNames in class RAProcesspublic java.util.Vector getOutputObjects()
An Actor does not have any outputs and will return null.
getOutputObjects in class RAProcesspublic RAReal getActorValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||